﻿	<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">  
	<title>{$title}</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="/static/admin/css/bootstrap.css" rel="stylesheet">
	<link href="/static/admin/css/site.css" rel="stylesheet">
    <link href="/static/admin/css/bootstrap-responsive.css" rel="stylesheet">
    <!--[if lt IE 9]>
      <script src="/static/admin/js/html5.js"></script>
    <![endif]-->
	<!--[if lte IE 8]><script src="/static/admin/js/excanvas.min.js"></script><![endif]-->
    <style type="text/css">
    html, body {
        height: 100%;
    }
    </style>
  </head>
  <body>

  <!--head-->
    <div class="navbar navbar-fixed-top">
      <div class="navbar-inner">
        <div class="container-fluid">
          <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </a>
          <a class="brand" href="#">Admin</a>
          <div class="btn-group pull-right">
			<a class="btn" href="../my-profile.html"><i class="icon-user"></i>{$_SESSION['adminname']}</a>
            <a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
              <span class="caret"></span>
            </a>
            <ul class="dropdown-menu">
			  <li><a href="../my-profile.html">个人资料</a></li>
              <li class="divider"></li>
              <li><a href="{:url('login/out')}">退出</a></li>
            </ul>
          </div>
          <div class="nav-collapse">
            <ul class="nav">
			<li><a href="index.html">首页</a></li>
              <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">用户 <b class="caret"></b></a>
				<ul class="dropdown-menu">
					<li><a href="{:url('user/index')}">新建用户</a></li>
					<li class="divider"></li>
					<li><a href="../users.html">管理用户</a></li>
				</ul>
			  </li>
              <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">角色 <b class="caret"></b></a>
				<ul class="dropdown-menu">
					<li><a href="{:url('user/index')}">新建角色</a></li>
					<li class="divider"></li>
					<li><a href="../roles.html">管理角色</a></li>
				</ul>
			  </li>
			  <li><a href="../stats.html">统计</a></li>
            </ul>
          </div>
        </div>
      </div>
    </div>
    <!--head-->
    

    
    <div class="container-fluid">

    <!-- left -->
      <div class="row-fluid">
        <div class="span3">
          <div class="well sidebar-nav nav">
            <ul id="lilist" class="nav nav-list ">
              <li class="nav-header"><i class="icon-wrench"></i> 会员管理</li>
              <li><a href="{:url('user/user')}">会员列表</a></li>

              <li class="nav-header"><i class="icon-wrench"></i> 好友管理</li>
              <li><a href="{:url('vip/usersfriend')}">会员好友</a></li>


              <li class="nav-header"><i class="icon-wrench"></i> 分类管理</li>
              <li><a href="{:url('bclass/newblogclass')}">新增分类</a></li>
              <li><a href="{:url('bclass/blogclass')}">分类列表</a></li>

              <li class="nav-header"><i class="icon-wrench"></i> 博文管理</li>

              <li><a href="{:url('/adblog')}">博文列表</a></li>


              <li class="nav-header"><i class="icon-wrench"></i> 评论管理</li>
              <li><a href="{:url('/admincomment')}">评论列表</a></li>

              <li class="nav-header"><i class="icon-wrench"></i> 相册管理</li>
              <li><a href="{:url('/adimageuid')}">相册列表</a></li>

              <li class="nav-header"><i class="icon-wrench"></i> 广告管理</li>
              <li><a href="{:url('Advertisement/insertadvert')}">插入广告</a></li>
              <li><a href="{:url('Advertisement/index')}">广告列表</a></li>

              <li class="nav-header"><i class="icon-signal"></i> 统计</li>

              <li><a href="{:url('api/index')}">后台娱乐</a></li>



              


              <li><a href="#">设置</a></li>
			  <li><a href="{:url('login/out')}">退出</a></li>
            </ul>
          </div>
        </div>
    <!-- left -->
{block name="main"}
    <!-- right -->
        <div class="span9">
		  <div class="row-fluid">
			<div class="page-header">
				<h1>网站统计 <small></small></h1>
			</div>
			<div id="placeholder" style="width:80%;height:300px;"></div>
			<br />
			<div id="visits" style="width:80%;height:300px;"></div>
		  </div>
        </div>
      </div>
    <!-- right -->
{/block}
      <hr>

      <footer class="well">
        &copy; Admin 博客云后台管理系统
      </footer>

    </div>

    <script src="/static/admin/js/jquery.js"></script>

    <script src="/static/admin/js/bootstrap.min.js"></script>
    <script>

        var lililist=lilist.getElementsByTagName('li');
        for (var i = 0; i < lililist.length; i++) {
            lililist[i].onclick = function (){
                    this.className = 'active';

            }
        };


    </script>
	<!--<script src="/static/admin/js/jquery.flot.js"></script>-->
	<!--<script src="/static/admin/js/jquery.flot.resize.js"></script>-->


	<!--<script>-->
	<!--$(function () {-->
		<!--var data = [-->
		<!--{-->
			<!--label: 'Page Views',-->
			<!--data: [[0, 19000], [1, 15500], [2, 11100], [3, 15500]]-->
		<!--}];-->
		<!--var dataVisits = [-->
		<!--{-->
			<!--label: 'Visits',-->
			<!--data: [[0, 1980], [1, 1198], [2, 830], [3, 1550]]-->
		<!--}];-->
		<!--var options = {-->
			<!--legend: {-->
				<!--show: true,-->
				<!--margin: 10,-->
				<!--backgroundOpacity: 0.5-->
			<!--},-->
			<!--points: {-->
				<!--show: true,-->
				<!--radius: 3-->
			<!--},-->
			<!--lines: {-->
				<!--show: true-->
			<!--},-->
			<!--grid: {-->
				<!--borderWidth:1,-->
				<!--hoverable: true-->
			<!--},-->
			<!--xaxis: {-->
				<!--axisLabel: 'Month',-->
				<!--ticks: [[0, 'Jan'], [1, 'Feb'], [2, 'Mar'], [3, 'Apr'], [4, 'May'], [5, 'Jun'], [6, 'Jul'], [7, 'Aug'], [8, 'Sep'], [9, 'Oct'], [10, 'Nov'], [11, 'Dec']],-->
				<!--tickDecimals: 0-->
			<!--},-->
			<!--yaxis: {-->
				<!--tickSize:1000,-->
				<!--tickDecimals: 0-->
			<!--}-->
		<!--};-->
		<!--var optionsVisits = {-->
			<!--legend: {-->
				<!--show: true,-->
				<!--margin: 10,-->
				<!--backgroundOpacity: 0.5-->
			<!--},-->
			<!--bars: {-->
				<!--show: true,-->
				<!--barWidth: 0.5,-->
				<!--align: 'center'-->
			<!--},-->
			<!--grid: {-->
				<!--borderWidth:1,-->
				<!--hoverable: true-->
			<!--},-->
			<!--xaxis: {-->
				<!--axisLabel: 'Month',-->
				<!--ticks: [[0, 'Jan'], [1, 'Feb'], [2, 'Mar'], [3, 'Apr'], [4, 'May'], [5, 'Jun'], [6, 'Jul'], [7, 'Aug'], [8, 'Sep'], [9, 'Oct'], [10, 'Nov'], [11, 'Dec']],-->
				<!--tickDecimals: 0-->
			<!--},-->
			<!--yaxis: {-->
				<!--tickSize:1000,-->
				<!--tickDecimals: 0-->
			<!--}-->
		<!--};-->
		<!--function showTooltip(x, y, contents) {-->
			<!--$('<div id="tooltip">' + contents + '</div>').css( {-->
				<!--position: 'absolute',-->
				<!--display: 'none',-->
				<!--top: y + 5,-->
				<!--left: x + 5,-->
				<!--border: '1px solid #D6E9C6',-->
				<!--padding: '2px',-->
				<!--'background-color': '#DFF0D8',-->
				<!--opacity: 0.80-->
			<!--}).appendTo("body").fadeIn(200);-->
		<!--}-->
		<!--var previousPoint = null;-->
		<!--$("#placeholder, #visits").bind("plothover", function (event, pos, item) {-->
			<!--if (item) {-->
				<!--if (previousPoint != item.dataIndex) {-->
					<!--previousPoint = item.dataIndex;-->

					<!--$("#tooltip").remove();-->
					<!--showTooltip(item.pageX, item.pageY, item.series.label + ": " + item.datapoint[1]);-->
				<!--}-->
			<!--}-->
			<!--else {-->
				<!--$("#tooltip").remove();-->
				<!--previousPoint = null;-->
			<!--}-->
		<!--});-->
		<!--$.plot( $("#placeholder") , data, options );-->
		<!--$.plot( $("#visits") , dataVisits, optionsVisits );-->
	<!--});-->
	<!--</script>-->
  {block name="myblogjs"}


  <script>


//      获取id的操作
      $(function (){
          //触发用户删除
          $('.btn-del').click(function(){
              var ac_id =$(this).attr('data-id');
              console.log('删除ID为:', ac_id);
              if(confirm('你确定要[删除]该用户么?')){
                  var obj = $(this).parents('tr');
                  blogdelete(ac_id, obj);
              }

          });


      });


//      执行AJAX删除操作
            function blogdelete(id,obj){
                console.log(id);
                $.ajax({
                type: 'delete',
                url: '/adblog/'+id,
                dateType: 'json',
                success: function (data){
                    console.log(data);
                    if(data.status){

                        console.log('删除成功');
                        obj.remove();
                    }else{
                        console.log('删除失败');

                    }
                },
                error: function (){
                    alert('ajax操作失败');
                }


             });
            }

  </script>

  {/block}

{block name="myimagesjs"}
    <script>
        $(function (){
            $('.img-status').click(function(){
                var id = $(this).attr('img_id');
                var obj = $(this);
                console.log(id);
                $.ajax({
                    type: 'get',
                    url: '/adimgdetstatus/id/' + id,
                    dateType: 'json',
                    success: function (data) {
                        console.log(data);
                        if (data.status) {

                            console.log('更新成功');
                            console.log(data.name);
                            if(data.name==1){
                                obj.html('不显示');
                            }else{
                                obj.html('显示');
                            }



                        } else {
                            console.log('更新失败');

                        }
                    },
                    error: function () {
                        alert('ajax操作失败');
                    }
                });
            });
        });



    </script>
{/block}

  </body>
</html>

